/*using System.Xml.Linq;
using Engine;
using Engine.Media;
using Game;

namespace RuthlessConquest;

public class BitmapButtonWidget : ButtonWidget
{
    public RectangleWidget RectangleWidget;

    public RectangleWidget ImageWidget;

    public LabelWidget LabelWidget;

    public ClickableWidget ClickableWidget;

    public override bool IsClicked => ClickableWidget.IsClicked;

    public override bool IsChecked
    {
        get
        {
            return ClickableWidget.IsChecked;
        }
        set
        {
            ClickableWidget.IsChecked = value;
        }
    }

    public override bool IsAutoCheckingEnabled
    {
        get
        {
            return ClickableWidget.IsAutoCheckingEnabled;
        }
        set
        {
            ClickableWidget.IsAutoCheckingEnabled = value;
        }
    }

    public override bool IsOkButton
    {
        get
        {
            return ClickableWidget.IsOkButton;
        }
        set
        {
            ClickableWidget.IsOkButton = value;
        }
    }

    public override bool IsCancelButton
    {
        get
        {
            return ClickableWidget.IsCancelButton;
        }
        set
        {
            ClickableWidget.IsCancelButton = value;
        }
    }

    public override string Text
    {
        get
        {
            return LabelWidget.Text;
        }
        set
        {
            LabelWidget.Text = value;
        }
    }

    public override BitmapFont Font
    {
        get
        {
            return LabelWidget.Font;
        }
        set
        {
            LabelWidget.Font = value;
        }
    }

    public Subtexture NormalSubtexture { get; set; }

    public Subtexture ClickedSubtexture { get; set; }

    public override Color Color { get; set; }

    public BitmapButtonWidget()
    {
        Color = Color.White;
        XElement node = ContentManager.Get<XElement>("Widgets/BitmapButtonContents");
        WidgetsManager.LoadWidgetChildren(this, this, node);
        RectangleWidget = Children.Find<RectangleWidget>("Button.Rectangle");
        ImageWidget = Children.Find<RectangleWidget>("Button.Image");
        LabelWidget = Children.Find<LabelWidget>("Button.Label");
        ClickableWidget = Children.Find<ClickableWidget>("Button.Clickable");
        WidgetsManager.LoadWidgetProperties(this, this, node);
    }

    public override void MeasureOverride(Vector2 parentAvailableSize)
    {
        bool flag = WidgetsManager.IsWidgetEnabled(this);
        LabelWidget.Color = (flag ? Color : new Color(112, 112, 112));
        ImageWidget.FillColor = (flag ? Color : new Color(112, 112, 112));
        if (ClickableWidget.IsPressed || IsChecked)
        {
            RectangleWidget.Subtexture = ClickedSubtexture;
        }
        else
        {
            RectangleWidget.Subtexture = NormalSubtexture;
        }
        base.MeasureOverride(parentAvailableSize);
    }
}
*/

